//package com.booter.producer.config.strategy;
//
//import org.apache.shardingsphere.api.sharding.standard.PreciseShardingAlgorithm;
//import org.apache.shardingsphere.api.sharding.standard.PreciseShardingValue;
//
//import java.text.SimpleDateFormat;
//import java.util.ArrayList;
//import java.util.Collection;
//import java.util.Date;
//import java.util.List;
//
//public class MyPreciseShardingAlgorithm implements PreciseShardingAlgorithm<Date> {
//
//    @Override
//    public String doSharding(Collection<String> collection, PreciseShardingValue<Date> preciseShardingValue) {
//        String logicTableName = preciseShardingValue.getLogicTableName();
//        Date date = preciseShardingValue.getValue();
//
//        List<String> shardingSuffix = new ArrayList<>();
//        //获取日期时间所在的月份
//        String str = new SimpleDateFormat("MM").format(date);
//        //添加记录所在分表表名集合
//        shardingSuffix.add(logicTableName + "_" + str);
//        return null;
//    }
//}